import request from '@/utils/request'

// 查询钉钉配置信息
export function getDingTalk () {
  return request({
    url: '/tool/dingTalk/query',
    method: 'get'
  })
}

// 激活钉钉信息
export function init () {
  return request({
    url: '/tool/dingTalk/init',
    method: 'get'
  })
}

// 激活钉钉信息
export function addDingTalk (data) {
  return request({
    url: '/tool/dingTalk',
    method: 'post',
    data: data
  })
}

// 激活钉钉信息
export function updateDingTalk (data) {
  return request({
    url: '/tool/dingTalk',
    method: 'put',
    data: data
  })
}

// 删除钉钉信息
export function delDingTalk (dingId) {
  return request({
    url: '/tool/dingTalk/' + dingId,
    method: 'delete'
  })
}